﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderRefundDetail.aspx.cs" Inherits="ZLCMS.Web.SystemManage.Basics.Shop.OrderReturns.OrderRefundDetail" %>

<%@ Import Namespace ="ZLCMS.Business.Util" %>
<%@ Import Namespace="ZLCMS.Commands.User.Util" %>
<div class="pageContent">
    <div class="pageFormContent" layoutH="56">
    
    <div class="panel collapse">
		<h1>退款信息：<%= Request["rno"]%></h1>
		<div>
		   <table class="list" targetType="navTab" asc="asc" desc="desc" style="width: 100%;">
        
                <tr>   <td style="width: 10%;">实际支付总额：</td>
			<td><%=OrderRefundData["PaymentPrice"] %></td>
            <td style="width: 10%;">退回金额：</td>
			<td><%= OrderRefundData["RefundPrice"]%></td>
            </tr>
       <tr>
			<td style="width: 10%;">备注：</td>
			<td colspan='3' >
               <%=OrderRefundData["Memos"]%>
			</td> </tr>
        </table>
		</div>
	</div>
    
	<div class="panel collapse">
		<h1>退款管理：[<%= ParamKit.GetValue("OrderIsConfirmed", OrderRefundData["ConfirmStatus"], "&nbsp;")%>][<%= ParamKit.GetValue("ProcessStatus", OrderRefundData["ProcessStatus"], "&nbsp;")%>][<%= ParamKit.GetValue("OrderIsFinish", OrderRefundData["FinishStatus"], "&nbsp;")%>][<%= ParamKit.GetValue("OrderIsCancel", OrderRefundData["CancelStatus"], "&nbsp;")%>]</h1>
		<div>
            		<span width="100px;">
                    <%-- 客服确认状态--%>
                    <% if (AuthUtil.CheckAuthorization("ORDER_RETURN_MAN", "CONFIRM"))
                       {%>
                        <%if ("1".Equals(OrderRefundData["ConfirmStatus"])|| "1".Equals(OrderRefundData["CancelStatus"]))
                          {%>
<%--                         [<%= ParamKit.GetValue("OrderIsConfirmed", OrderRefundData["ConfirmStatus"], "&nbsp;")%>]--%>
                        <%}
                          else
                          { %>
                         <a style="margin-right: 5px;" class="button" href="/SystemManage/Basics/Shop/OrderReturns/OrderRefundConfirm.aspx?rno=<%= OrderRefundData["RefundNo"]  %>" target="dialog" rel="ConfirmRefund" max="false" mask="true" maxable="false" minable="false" width="800" height="400" title="请确认受理退款申请"><span>确认受理申请</span></a>
                        <%}
                       }%>
                       <%else
                       {%>
<%--                            [<%= ParamKit.GetValue("OrderIsConfirmed", OrderRefundData["ConfirmStatus"], "&nbsp;")%>]--%>
                       <%} %>
                </span>
                    <span width="100px;">
                      <%-- 处理状态--%>
                      <%if (AuthUtil.CheckAuthorization("ORDER_RETURN_MAN", "PROCESS"))
                        {%>
                         <%if ("1".Equals(OrderRefundData["ProcessStatus"]) || "1".Equals(OrderRefundData["CancelStatus"]))
                           {%>
<%--                            [<%= ParamKit.GetValue("ProcessStatus", OrderRefundData["ProcessStatus"], "&nbsp;")%>]--%>
                         <%}
                           else if ("1".Equals(OrderRefundData["ConfirmStatus"]))
                           { %>
                            <a style="margin-right: 5px;" class="button" href="/SystemManage/Basics/Shop/OrderReturns/OrderRefundProcess.aspx?rno=<%= OrderRefundData["RefundNo"]  %>" target="dialog" rel="ProcessRefund" max="false" mask="true" maxable="false" minable="false" width="800" height="400" title="处理退款申请"><span>处理退款申请</span></a>
                          <%}
                           else
                           { %>
<%--                            [<%= ParamKit.GetValue("ProcessStatus", OrderRefundData["ProcessStatus"], "&nbsp;")%>]--%>
                         <%}
                        }%>
                        <%else {%>
<%--                        [<%= ParamKit.GetValue("ProcessStatus", OrderRefundData["ProcessStatus"], "&nbsp;")%>]--%> 
                        <%} %>
                    </span>
                    <span width="100px;">
                    <%-- 完成状态--%>
                    <%if (AuthUtil.CheckAuthorization("ORDER_RETURN_MAN", "FINISH"))
                      { %>
                         <%if ("1".Equals(OrderRefundData["FinishStatus"]) ||"1".Equals( OrderRefundData["CancelStatus"]))
                           {%>
<%--                         [<%= ParamKit.GetValue("OrderIsFinish", OrderRefundData["FinishStatus"], "&nbsp;")%>]--%>
                         <%}
                           else if ("1".Equals(OrderRefundData["ProcessStatus"]))
                           { %>
                         <a style="margin-right: 5px;" class="button" href="/SystemManage/Basics/shop/OrderReturns/OrderRefundFinish.aspx?rno=<%= OrderRefundData["RefundNo"]  %>" target="dialog" rel="FinishRefund" max="false" mask="true" maxable="false" minable="false" width="800" height="400" title="请确认完成退款申请"><span>完成退款申请</span></a>
                         <%}
                           else
                           { %>
<%--                         [<%= ParamKit.GetValue("OrderIsFinish", OrderRefundData["FinishStatus"], "&nbsp;")%>]--%>
                         <%}
                      }%>
                      <%else {%>
<%--                        [<%= ParamKit.GetValue("OrderIsFinish", OrderRefundData["FinishStatus"], "&nbsp;")%>]--%>
                      <% } %>
                    </span>
                    <span width="100px;">
                    <%-- 确认取消--%>
                    <% if (AuthUtil.CheckAuthorization("ORDER_RETURN_MAN", "CANCEL"))
                       {%>
                       <%if ("0".Equals(OrderRefundData["CancelStatus"]) && (!"1".Equals(OrderRefundData["FinishStatus"]) || !"1".Equals(OrderRefundData["ProcessStatus"])))
                         {%>
                       <a class="button" href="/SystemManage/Basics/shop/OrderReturns/OrderRefundCancel.aspx?rno=<%= OrderRefundData["RefundNo"]  %>" target="dialog" rel="CancelRefund" max="false" mask="true" maxable="false" minable="false" width="800" height="400" title="请确认取消退款申请"><span>取消退款申请</span></a>
		            	<%}
                         else
                         { %>
<%--                          [<%= ParamKit.GetValue("OrderIsCancel", OrderRefundData["CancelStatus"], "&nbsp;")%>]--%>
		            	<%}
                       }%>
                       <%else {%>
<%--                        [<%= ParamKit.GetValue("OrderIsCancel", OrderRefundData["CancelStatus"], "&nbsp;")%>] --%>
                       <%} %>
                    </span>
		</div>
	</div>
    
	<div class="panel collapse">
		<h1>订单信息</h1>
		<div>
		
    	<table class="list" width="100%">
        <tr>
        <td style="width: 10%;">订单编号：</td>
        <td>
            <a href="/SystemManage/Basics/Shop/Order/OrderDetail.aspx?no=<%=OrderRefundData["OrderNo"]%>" target="navTab" title="订单详情" rel="OrderDetail"><%=OrderRefundData["OrderNo"]%></a>&nbsp;&nbsp;
        </td>
		  <td style="width: 10%;">订单状态：</td>
            <td>
                    [<%= ParamKit.GetValue("OrderIsConfirmed", OrderDt.ConfirmedStatus, "&nbsp;")%>]
				    [<%= ParamKit.GetValue("OrderPayStatus", OrderDt.PayStatus, "&nbsp;")%>]
				    [<%= ParamKit.GetValue("OrderShippingStatus", OrderDt.ShippingStatus, "&nbsp;")%>]
				    [<%= ParamKit.GetValue("OrderIsFinish", OrderDt.FinishedStatus, "&nbsp;")%>]
				    [<%= ParamKit.GetValue("OrderIsCancel", OrderDt.CancelStatus, "&nbsp;")%>]
            </td>
        </tr>
        <tr>
         <td style="width: 10%;">收货人姓名：</td>
        <td>
           <%=OrderDt.ReceiverName%>
        </td>
         <td style="width: 10%;">收货人电话：</td>
        <td>
           <%=OrderDt.ReceiverPhone%>
        </td>
        </tr>
         <tr>
         <td style="width: 10%;">收货人地址：</td>
        <td>
           <%=OrderDt.ReceiverAddress%>
        </td>
          <td style="width: 10%;">
          收货人备注：</td>
			<td><%= OrderDt.Remark%></td>
        </tr>
    	<tr>
        <table class="list" targetType="navTab" asc="asc" desc="desc" style="width: 100%;">
	    <thead>
			<tr>
             <th width="80px">商品图片</th>
				<th width="200px">商品名称</th>
				<th width="80px">购买数量</th>
				<th width="80px">总价</th>
			</tr>
		</thead>
		<tbody>
                  <asp:repeater runat="server" id="refund" >
                <ItemTemplate>
			    <tr target="uid">
                 <td style="width:80px;height:80px">
                 <img style="width:80px;height:80px" src="<%#FileKit.FirstFilePath(((IDictionary)Container.DataItem)["ThumbnailImg"]) %>"/>
                 </td>
				    <td><%# ((IDictionary)Container.DataItem)["ProductName"]%></td>
                    <td><%# ((IDictionary)Container.DataItem)["Quantity"]%></td>
				    <td><%# ((IDictionary)Container.DataItem)["TotalPrice"]%></td>

			    </tr>
            </ItemTemplate>
            </asp:repeater>
		</tbody>
	</table>
        </tr>

        </table>
        
        <div class="divider"></div>
      
        
		</div>
	</div>
    		
	</div>
        
	<div class="formBar">
		<ul>
			<li><div class="button"><div class="buttonContent"><button type="button" class="close">关闭</button></div></div></li>
		</ul>
	</div>  
</div>

<script type="text/javascript">
    $('td.images').find('.prettyPhoto').prettyPhoto();
</script>
